<!-- 我的表格 -->

<template>
  <WebTable>
    <RowIndex />

    <RowTitle label="任务名称" bind="taskName" :minWidth="160" />

    <RowDict label="所属计划" bind="planId" :dict="plan_selectDict" :minWidth="120" />

    <RowNum label="巡更点" bind="pointNum" />

    <RowNum label="正常打卡" bind="successPoint" />

    <RowNum label="异常打卡" bind="failurePoint" />

    <RowTime label="开始时间" bind="beginTime" />

    <RowTime label="结束时间" bind="endTime" />

    <RowText label="人员名称" bind="userName" />

    <RowStatus label="任务结果" bind="result" />

    <RowOperate :width="120">
      <template #default="{ row }">
        <BtnText title="查看" @click="windowDetail(row)" />

        <BtnText v-if="row.handleStatus === 3" title="审核" @click="openRelease(row)" />
        <BtnText v-if="row.handleStatus === 2" title="撤销" red @click="openCancel(row)" />
      </template>
    </RowOperate>
  </WebTable>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import mixDetailToTable from '@admin/components/detail/mixDetailToTable'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyTable',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [
    mixDetailToTable('', 'DetailPatrol'),
    CORE.mixWeb('deal', 'deal_'),
    CORE.mixSelect('plan', 'plan_'),
  ],
}
</script>
